﻿<%@ Page Language="C#" MasterPageFile="~/personal-accident/Personal_Accident.master"
    Async="true" AutoEventWireup="true" CodeFile="personal-accident.aspx.cs" Inherits="personal_accident_personal_accident" %>

<%@ Register Src="../controls/usrPhoneNo.ascx" TagName="usrPhoneNo" TagPrefix="uc1" %>
<%@ Register Src="../controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrOccupation.ascx" TagName="usrOccupation" TagPrefix="uc3" %>
<%@ Register Src="../controls/usrCompanyBigLogoByServices.ascx" TagName="usrCompanyBigLogoByServices"
    TagPrefix="uc4" %>
<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="elements_inner_wrapper">
        <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
        <!-- #Include file="../includes/body_loader.inc" -->

        <script type="text/javascript">            IncreaseProgress(5);</script>

        <div id="divContent" style="display: none">
            <div class="rightcol" id="divMainRight" runat="server">
                <div class="content_right">
                    <div class="tip">
                        <div class="head">
                        </div>
                        <div class="body" id="spanPartnerLogo">
                            <h1>
                                Our Merchants</h1>
                            <!-- #Include file="../includes/rcol_partners_home.aspx" -->
                        </div>
                        <div class="foot">
                        </div>
                    </div>
                    <br />
                    
                    
                    <div class="tip">
                        <div class="head">
                        </div>
                        <div class="body">
                            <h1>
                                Compare PA Insurance Online</h1>
                            <div class="pad_10">
                                <ul>
                                    <li class="one">Enter your requirements</li>
                                    <li class="two">Real time quotes from market leading brands</li>
                                    <li class="three">Buy direct from selected insurer</li>
                                </ul>
                            </div>
                        </div>
                        <div class="foot">
                        </div>
                    </div>
                </div>

<div class="seperator"></div>

            </div>
            <div class="rightcol" id="divEtiqaRight" runat="server" visible="false">
            <!--ETIQA right col-->
                <div class="sep64"></div>
                    <div class="tip">
                        <img src="/images/promo/flogo-etiqa.gif" alt="Etiqa" width="234" height="112" />
                    </div>
                    <div class="seperator"></div>
                    <div class="tip">
                        <div class="right_banner_200">
                            <h3 class="romeral">Exclusive</h3>
                            <p>You won't find a cheaper personal accident insurance package on any other websites.</p>
                        </div>
                    </div>
            </div>
            <div id="contentBody">
                <div class="bordered pad_7" style="font-size: 12px; color: #313131; background: #f9f9f9">
                    <strong>Accidents can happen to anyone, anytime, anywhere. So use CompareXpress to protect
                        against the unexpected by searching and comparing great value personal accident
                        insurance cover from trusted providers.</strong></div>
                <br />
                <div>
                    <asp:Label runat="server" ID="lblAgentHeader" Text="" />
                    <ul id="stp_menu">
                        <li class="stp1_r"><a href="#"><span class="active_r">Start Quote</span></a></li>
                        <li class="stp2"><a href="#"><span class="stp_r">Quote Results</span></a></li>
                        <li class="stp3"><a href="#"><span class="stp_r">Buy Now</span></a></li>
                    </ul>
                </div>
                <div class="seperator">
                </div>
                <div class="form_left_new">
                    <fieldset>
                        <div class="row">
                            <asp:ValidationSummary ID="ValidationSummary1" HeaderText="Oops Please complete the form."
                                runat="server" ValidationGroup="personal" CssClass="errorSummary" />
                        </div>
                        <div class="row_new">
                            <label class="mand_red">
                                Type of Personal Accident Cover</label>
                            <div class="field">
                                <span class="indicator">
                                    <asp:DropDownList ID="ddlPACover" onchange="ShowHideSpouseInfomation();ShowHideNoOfChild();"
                                        runat="server" class="text">
                                        <asp:ListItem Selected="True" Value="-1">Select</asp:ListItem>
                                        <asp:ListItem Value="IND">Individual</asp:ListItem>
                                        <asp:ListItem Value="INDSP">Individual & Spouse</asp:ListItem>
                                        <asp:ListItem Value="INDSPCHD">Individual, Spouse & Children</asp:ListItem>
                                    </asp:DropDownList>
                                </span><span class="indicator">
                                    <asp:RequiredFieldValidator ID="rfvPACover" InitialValue="-1" runat="server" ControlToValidate="ddlPACover"
                                        CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="personal"></asp:RequiredFieldValidator>
                                </span>
                            </div>
                            <div class="clear">
                            </div>
                        </div>

                        <script type="text/javascript">
                            IncreaseProgress(25);
                        </script>

                        <div class="row_new">
                            <h4>
                                Insured Information</h4>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="row_new">
                            <label class="mand_red">
                                Date of Birth
                            </label>
                            <div class="field">
                                <span class="indicator">
                                    <uc2:usrDate ID="usrDOB" ValidationGroup="personal" runat="server" />
                                </span>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="row_new">
                            <label class="mand_red">
                                Occupation
                            </label>
                            <div class="field">
                                <span class="indicator">
                                    <uc3:usrOccupation ID="usrOccupation" ValidationGroup="personal" runat="server" />
                                </span><span class="formInfo1"><a href="/tooltips/occupation.htm?width=366" class="jTip"
                                    id="one">
                                    <img src="/images/icons/help.gif" alt="Help" style="vertical-align: middle" width="16"
                                        height="18" /></a></span>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div id="divSpouse" style="display: none;">
                            <div class="row_new">
                                <h4>
                                    Spouse Information</h4>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row_new">
                                <label class="mand_red">
                                    Date of Birth
                                </label>
                                <div class="field">
                                    <span class="indicator">
                                        <uc2:usrDate ID="usrSPDOB" ValidationGroup="personal" runat="server" />
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row_new">
                                <label class="mand_red">
                                    Occupation
                                </label>
                                <div class="field">
                                    <span class="indicator">
                                        <uc3:usrOccupation ID="usrSPOccupation" ValidationGroup="personal" runat="server" />
                                    </span><span class="formInfo1"><a href="/tooltips/occupation.htm?width=366" class="jTip"
                                        id="two">
                                        <img src="/images/icons/help.gif" alt="Help" style="vertical-align: middle" width="16"
                                            height="18" /></a></span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </div>

                        <script type="text/javascript">
                            IncreaseProgress(65);
                        </script>

                        <div id="divNoOfChild" style="display: none;">
                            <div class="row_new">
                                <h4>
                                    Children Information</h4>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="row_new">
                                <label class="mand_red">
                                    Number of Children</label>
                                <div class="field">
                                    <span class="indicator">
                                        <asp:DropDownList ID="ddlNoOfChild" runat="server" class="text">
                                            <asp:ListItem Selected="True" Value="-1">Select</asp:ListItem>
                                            <asp:ListItem Value="1">1</asp:ListItem>
                                            <asp:ListItem Value="2">2</asp:ListItem>
                                            <asp:ListItem Value="3">3</asp:ListItem>
                                            <asp:ListItem Value="4">4</asp:ListItem>
                                            <asp:ListItem Value="5">5</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="rfvNoOfChild" Enabled="false" InitialValue="-1" runat="server"
                                            ControlToValidate="ddlNoOfChild" CssClass="validationErrorControl" ErrorMessage=""
                                            ValidationGroup="personal"></asp:RequiredFieldValidator>
                                    </span>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </div>

                        <script type="text/javascript">
                            IncreaseProgress(80);
                        </script>

                        <div class="row_new">
                            <label class="mand_red">
                                <strong>Insurance Commencement Date</strong>
                            </label>
                            <div class="field">
                                <span class="indicator">
                                    <uc2:usrDate ID="usrInsCommentDate" ValidationGroup="personal" runat="server" />
                                </span>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                    </fieldset>
                    <div class="formButtons">
                        <span class="button2 right">
                            <asp:Button runat="server" ID="btnNext" CssClass="button_submit" ValidationGroup="personal"
                                OnClientClick="LoadValidationErrorCss();ShowSubmitProgress('personal');if (Page_ClientValidate('personal')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'button_processing';}"
                                OnClick="ImageButton1_Click" />
                        </span>
                    </div>
                    <br />
                    <br />
                    <div class="clear">
                    </div>
                </div>
                <div class="banner_middle">
                    <img  id="imgPABanner" runat="server" src="/images/bg/pa.jpg" alt="Money Mouse" title="Compare Personal Accident Insurance"
                        width="210" height="330" />
                </div>
                <div style="display: none;">
                    <input id="inputPID" runat="server" />
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        //<![CDATA[ 

        function CheckLoanPurpose(sender, args) {
            var cval = document.getElementById('<=ddlLoanPurpose.ClientID>'); //alert("CheckLoanPurpose");
            if (cval.value == -1)
                args.IsValid = false;
        }

        function CheckPropertyType(sender, args) {
            var cval = document.getElementById('<=ddlPropertyType.ClientID>'); //alert("CheckPropertyType");
            if (cval.value == -1)
                args.IsValid = false;
        }

        function CheckPropertyStatus(sender, args) {
            var cval = document.getElementById('<=ddlPropertyStatus.ClientID>'); //alert("CheckPropertyStatus");
            if (cval.value == -1)
                args.IsValid = false;
        }

        function CheckLoanTenure(sender, args) {
            var cval = document.getElementById('<=ddlLoanTenure.ClientID>'); //alert("CheckLoanTenure");
            if (cval.value == -1)
                args.IsValid = false;
        }

        function CheckInterestRate(sender, args) {
            var cval = document.getElementById('<=ddlInterestRate.ClientID>'); //alert("CheckInterestRate");
            if (cval.value == -1)
                args.IsValid = false;
        }

        function CheckLockInPeriod(sender, args) {
            var cval = document.getElementById('<=ddlLockInPeriod.ClientID>'); //alert("CheckLockInPeriod");
            if (cval.value == -1)
                args.IsValid = false;
        }

        function CheckPropertyValue(sender, args) {
            var cval = document.getElementById('<=txtPropertyValue.ClientID>'); //alert(cval);
            var iVal = parseFloat(cval.value); //alert("CheckPropertyValue"); //alert(iVal);
            if (isNaN(iVal))
                args.IsValid = false;
            else
                cval.value = iVal;
        }

        function CheckFinancingAmount(sender, args) {
            var cval = document.getElementById('<=txtFinancingAmount.ClientID>'); //alert(cval);
            var iVal = parseFloat(cval.value); //alert("CheckFinancingAmount"); //alert(iVal);
            if (isNaN(iVal))
                args.IsValid = false;
            else
                cval.value = iVal;
        }

        function ShowHideDiv(divName, varOnOff) {
            if (varOnOff) {
                document.getElementById(divName).style.display = "";
            }
            else {
                document.getElementById(divName).style.display = "none";
            }
        }

        function ShowHideSpouseInfomation() {
            var ddlPACover = document.getElementById('<%=ddlPACover.ClientID%>');
            var prefixDate = "<%=usrSPDOB.ClientID%>";
            //var valDate = prefixDate + "_csvDate";
            var prefixOccupaton = "<%=usrSPOccupation.ClientID%>";
            var valOccupation = prefixOccupaton + "_rfvOccupation"; //alert(valOccupation); //alert(ddlLoanType.value);

            if (ddlPACover.value == 'INDSP' || ddlPACover.value == 'INDSPCHD') {
                ShowHideDiv('divSpouse', true);
                IsEnableDateValidation(prefixDate, true); //ValidatorEnable(document.getElementById(valDate),true);
                ValidatorEnable(document.getElementById(valOccupation), true);
            }
            else if (ddlPACover.value == '-1' || ddlPACover.value == 'INDCHD' || ddlPACover.value == 'IND') {
                ShowHideDiv('divSpouse', false);
                IsEnableDateValidation(prefixDate, false); //ValidatorEnable(document.getElementById(valDate),false);
                ValidatorEnable(document.getElementById(valOccupation), false);
            }
        }

        function ShowHideNoOfChild() {
            var ddlPACover = document.getElementById('<%=ddlPACover.ClientID%>'); //alert(ddlLoanType.value);
            if (ddlPACover.value == 'INDCHD' || ddlPACover.value == 'INDSPCHD') {
                ShowHideDiv('divNoOfChild', true);
                ValidatorEnable(document.getElementById('<%=rfvNoOfChild.ClientID%>'), true);
            }
            else if (ddlPACover.value == '-1' || ddlPACover.value == 'INDSP' || ddlPACover.value == 'IND') {
                ShowHideDiv('divNoOfChild', false);
                ValidatorEnable(document.getElementById('<%=rfvNoOfChild.ClientID%>'), false);
            }
        }

        var hookValDate = false;
        function HookDateValidation() {
            if (hookValDate == false) {
                var prefix = "<%=usrDOB.ClientID%>"; //alert(prefix);
                var ddlMonth = prefix + "_ddlMonth";
                var ddlYear = prefix + "_ddlYear";
                var valCtrl = prefix + "_csvDate";
                //alert(ddlYear); ValidatorHookupControlID(ddlMonth,document.getElementById(valCtrl));
                ValidatorHookupControlID(ddlYear, document.getElementById(valCtrl));
                prefix = "<%=usrSPDOB.ClientID%>";
                ddlMonth = prefix + "_ddlMonth";
                ddlYear = prefix + "_ddlYear";
                valCtrl = prefix + "_csvDate";
                ValidatorHookupControlID(ddlMonth, document.getElementById(valCtrl));
                ValidatorHookupControlID(ddlYear, document.getElementById(valCtrl));
                prefix = "<%=usrInsCommentDate.ClientID%>";
                ddlMonth = prefix + "_ddlMonth";
                ddlYear = prefix + "_ddlYear";
                valCtrl = prefix + "_csvDate";
                ValidatorHookupControlID(ddlMonth, document.getElementById(valCtrl));
                ValidatorHookupControlID(ddlYear, document.getElementById(valCtrl));
                hookValDate = true;
            }
        }
        //        HookDateValidation();
        //        ShowHideSpouseInfomation();
        //        ShowHideNoOfChild();

        function showhide(el) {
            el = document.getElementById(el);
            el.style.display = (el.style.display == "none") ? "block" : "none";
        }
        window.onload = function() {
            showhide('divSpouse');
            showhide('divNoOfChild');
            HookDateValidation();
            ShowHideSpouseInfomation();
            ShowHideNoOfChild();
        }


        IncreaseProgress(100);
        HideLoading();

        //]]> 
    </script>

    <script src="../../includes/personalaccident/personalaccident.js" type="text/javascript"></script>

</asp:Content>
